<?php echo $this->renderElement('admin/menu'); ?>
<br />
<?php echo $html->link("Add Profil", '/profils/addProfil')."<br /><br />"; ?>
<br />
<h2><?php echo "Liste de Profils par défaut"; ?></h2>
<table width="100%">
<th>#id</th><th><?php echo "Label"; ?></th><th><?php echo "Default Value"; ?></th><th>Actions</th>
<?php
	foreach($defaults as $profil):
		echo "<tr>";
		echo "<td>".$html->link("#".$profil['Profil']['id'], '/profils/view/'.$profil['Profil']['id'])."</td>";
		echo "<td>".$html->link($profil['Profil']['label'], '/profils/view/'.$profil['Profil']['id'])."</td>";
		echo "<td>".$profil['Profil']['default_value']."</td>";
		echo "<td>".$html->link(__('view', true), '/profils/view/'.$profil['Profil']['id'])." | ".$html->link(__('edit', true), '/profils/edit/'.$profil['Profil']['id'])." | ".$html->link(__('delete', true), '/profils/del/'.$profil['Profil']['id'])."</td>";				
		echo "</tr>";
	endforeach;
?>
</table>

<br /><br />
<h2><?php echo "Liste de Profils non liés à un contrat"; ?></h2>
<table width="100%">
<th>#id</th><th><?php echo "Label"; ?></th><th><?php echo "Default Value"; ?></th><th>Actions</th>
<?php
	foreach($unlinked as $profil):
		echo "<tr>";
		echo "<td>".$html->link("#".$profil['Profil']['id'], '/profils/view/'.$profil['Profil']['id'])."</td>";
		echo "<td>".$html->link($profil['Profil']['label'], '/profils/view/'.$profil['Profil']['id'])."</td>";
		echo "<td>".$profil['Profil']['default_value']."</td>";
		echo "<td>".$html->link(__('view', true), '/profils/view/'.$profil['Profil']['id'])." | ".$html->link(__('edit', true), '/profils/edit/'.$profil['Profil']['id'])." | ".$html->link(__('delete', true), '/profils/del/'.$profil['Profil']['id'])."</td>";				
		echo "</tr>";
	endforeach;
?>
</table>
<br /><br />

<h2><?php echo "Liste des Profils"; ?></h2>
<table width="100%">
<th>#id</th><th><?php echo "Label"; ?></th><th><?php echo "Default Value"; ?></th><th>Actions</th>
<?php
	foreach($others as $profil):
		echo "<tr>";
		echo "<td>".$html->link("#".$profil['Profil']['id'], '/profils/view/'.$profil['Profil']['id'])."</td>";
		echo "<td>".$html->link($profil['Profil']['label'], '/profils/view/'.$profil['Profil']['id'])."</td>";
		echo "<td>".$profil['Profil']['default_value']."</td>";
		echo "<td>".$html->link(__('view', true), '/profils/view/'.$profil['Profil']['id'])." | ".$html->link(__('edit', true), '/profils/edit/'.$profil['Profil']['id'])." | ".$html->link(__('delete', true), '/profils/del/'.$profil['Profil']['id'])."</td>";				
		echo "</tr>";
	endforeach;
?>
</table>